//package com.lshlmy.gateway.config;
//
//import org.springframework.cloud.gateway.filter.GatewayFilterChain;
//import org.springframework.cloud.gateway.filter.GlobalFilter;
//import org.springframework.http.server.reactive.ServerHttpRequest;
//import org.springframework.stereotype.Component;
//import org.springframework.web.server.ServerWebExchange;
//import reactor.core.publisher.Mono;
//
///**
// * @author liangxiangming
// * @date 2022/09/19
// **/
//@Component
//public class ForwardAuthFilter implements GlobalFilter {
//
//
//    @Override
//    public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
//        ServerHttpRequest request = exchange.getRequest().mutate()
//                .header(LoginTokenUtil.LOGIN_TOKEN_NAME, LoginTokenUtil.getLoginToken(exchange))
//                .build();
//        ServerWebExchange newExchange = exchange.mutate().request(request).build();
//        return chain.filter(newExchange);
//    }
//}